<?php
error_reporting(E_ALL ^ E_NOTICE);
session_start();
dbconnect();
//include("../include/function.php");

?>
<?php
if($_SESSION["loggedin"]==true && $_SESSION["role"]==admin)
{
if(isset($_SESSION[msg]))
{
echo $_SESSION[msg];
unset($_SESSION[msg]);
}
?>

<?php 

/* $selectadmin = "SELECT * from adminform";
$admincheck = mysql_query($selectadmin); */
?>
<table border="1" cellspacing="0">
<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
<td><a href="index.php?management=user&&task=add">Add</a></td></tr>
<tr>
<td>Employee name</td>
<td>Father Name</td>
<td>Mother Name</td>
<td>Address</td>
<td>PAN card No</td>
<td>Email id</td>
<td>Mobile/Telephone</td>
<td>Username</td>
<td>Password</td>

</tr>
<?php
//while($adminform = mysql_fetch_array($admincheck))
//print_r($adminform);
$resultset = selectquery("adminform");
foreach($resultset as $key=>$adminform)
{
?><tr><td>
<?php
echo $adminform['addempname'].'<br>';
?></td><td>
<?php
echo $adminform['addfathername'].'<br>';
?></td><td>
<?php
echo $adminform['addmothername'].'<br>';
?></td><td>
<?php
echo $adminform['addaddress'].'<br>';
?></td><td>
<?php
echo $adminform['addpanno'].'<br>';
?></td><td>
<?php
echo $adminform['addemailid'].'<br>';
?></td><td>
<?php
echo $adminform['addmobile'].'<br>';
?></td><td>
<?php
echo $adminform['addusername'].'<br>';
?></td><td>
<?php
echo $adminform['addpassword'].'<br>';
?></td>
<td><a href="index.php?management=user&&task=edit&&id=<?php echo $adminform['adminid']; ?>">Edit</a>
<a href="index.php?management=user&&task=delete&&id=<?php echo $adminform['adminid']; ?>">Delete</a>
</td>
<?php
?></tr>
<?php

}

?>

</table>
<?php 

?>
<?php
}
else
{
header("Location: login.php");
}
?>